<template>
  <div>excel导入题目答案
    <el-upload
      class="upload-demo"
      drag
      action="http://localhost:7020/importExcel"
      :on-success="handleAvatarSuccess"
      multiple>
      <i class="el-icon-upload"></i>
      <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
      <div class="el-upload__tip" slot="tip">只能上传xls,xlsx文件，且不超过500kb</div>
    </el-upload>
  </div>
</template>

<script>
  export default {
    name:'index',
    data:{

    },
    methods:{
      handleAvatarSuccess(res,file){
        console.log(res)
        alert(res.msg)
      }
    }
  }
</script>

<style>

</style>
